package controller;

import domain.Syslog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import service.ISysLogService;

import java.util.List;

/**
 * @author Freedy
 * @date 2020/12/27 12:50
 */
@Controller
@RequestMapping("/sysLog")
public class SysLogController {
    @Autowired
    private ISysLogService sysLogService;
    @RequestMapping("/findAll.do")
    public ModelAndView findAll() throws Exception {
        ModelAndView modelAndView = new ModelAndView();
        List<Syslog> list=sysLogService.findAll();
        modelAndView.addObject("sysLogs",list);
        modelAndView.setViewName("syslog-list");
        return modelAndView;
    }
}
